<h1>PasswordAgent</h1>
<form ng-keyup="generateWord()" ng-click="generateWord()">
  <!--ng-submit="generateWord()"-->
  <div>
    <label class="btn-success">{{word}}</label>
  </div>
  <div class="form-group">
    <label for="exampleInputEmail1">Email address</label>
    <input type="email" ng-model="email" name="email" class="form-control" id="exampleInputEmail1" placeholder="Enter email">
  </div>
  <div class="form-group">
    <label for="pattern">Pattern</label>
    <input type="text" ng-model="pattern" name="pattern" class="form-control" id="pattern" placeholder="Pattern">
  </div>
  <div class="form-group">
    <label for="Pattern Length">Pattern Length</label>
    <input type="text" ng-model="length" name="length" class="form-control" id="Pattern Length" placeholder="Pattern Length">
  </div>
  <div class="form-group">
    <label for="site">Site</label>
    <input type="text"  ng-model="site" name="site" class="form-control" id="site" placeholder="Site">
  </div>
  <div class="form-group panel panel-default" ng-repeat="answer in answers">
    <div class="panel-body">
      <button for="p{{answer.answerId}}" ng-mousedown="removeAnswer($index)" title="removeAnswer"
              class="btn btn-danger">x
      </button>
      <p id="p{{$index+1}}"></p>
      <label for="ask{{$index+1}}">Ask{{$index+1}}</label>
      <input type="text" name="ask" class="form-control" id="ask{{$index+1}}"
             placeholder="Ask{{$index+1}}" value="{{answer.ask}}" ng-model="answer.ask">
      <label for="answer{{$index+1}}">Answer{{$index+1}}</label>
      <input type="text" name="answer" class="form-control" id="answer{{$index+1}}"
             placeholder="Answer{{$index+1}}"  ng-model="answer.answer">
    </div>
  </div>
  <button ng-mousedown="addAnswer()" title="addAnswer" class="btn btn-primary">+</button>
  <div class="checkbox">
    <label>
      <input type="checkbox" ng-click="rememberMe()" ng-model="remember"
             title="If you choose this, our server will provide your email, password, site, asks you just input!">
      Remember asks
    </label>
  </div>
  <button type="submit" class="btn btn-success">Submit</button>
</form>


